//
$(function(){
$('body').append('<div id="ninjaVisitor"></div>');
$.getScript("http://p.wazameba.com/js/ninja-visitor.js", function(){ninjaVisitor(["http://stat.ameba.jp/user_images/20110613/20/fukushima-sample00/5c/59/g/o0100010211288762965.gif","http://stat.ameba.jp/user_images/20110613/20/fukushima-sample00/1b/41/g/o0100010211288762964.gif"])});
});

//comment nickname
/*sidebar*/
$(function(){$('#recent_comment ul li').append('<div class="comauth"></div>');$('.comauth').each(function(){var myS=$(this).prev().attr('href');var myU=myS.length-12;var myT=myS.substr(myU,12);$(this).load(myS+' a[id='+myT+']+.each_comment .comment_footer .comment_author a')})});












/* FavoriteIcon v1.1 - 5 May 09 (http://blog.liviuholhos.com/javascript/add-a-favicon-near-external-links-with-jquery)
 * Author : Liviu Holhos (http://www.liviuholhos.com/) */
(function($){$.fn.favoriteIcon=function(options){var defaults={iconClass:'favoriteIcon',insertMethod:'appendTo',iconSearched:'favicon.ico'};var options=$.extend(defaults,options);$(this).filter(function(){return this.hostname&&this.hostname!==location.hostname}).each(function(){var link=jQuery(this);var faviconURL=link.attr('href').replace(/^(http:\/\/[^\/]+).*$/,'$1')+'/'+options.iconSearched;var faviconIMG=jQuery('<img class="'+options.iconClass+'" src="" alt="" />')[options.insertMethod](link);var extImg=new Image();extImg.src=faviconURL;if(extImg.complete)faviconIMG.attr('src',faviconURL);else extImg.onload=function(){faviconIMG.attr('src',faviconURL)}})}})(jQuery);

$(document).ready(function() {
     $("#main .subContents a").favoriteIcon({ iconClass : 'favoriteIcon' });
});





//twiiter表示
//http://gihyo.jp/design/serial/01/jquery-site-production/0019

(function($){$.fn.twLine=function(options){var c=$.extend({user:null,number:10},options||{});var twiUrl='http://twitter.com/';$(this).each(function(){var self=$(this);if(!c.user){return false}self.append('<div class="loading"><img src="images/loading.gif" width="32" height="32" alt="" />loading...</div>','<ul/>');$.getJSON('http://twitter.com/statuses/user_timeline/'+c.user+'.json?callback=?',function(data){$('.loading',self).remove();if(data.length<1){$('ul',self).append('<li>投稿がありません。</li>');return false}$.each(data,function(i,items){if(i>(c.number-1)){return false}var txt=items.text;txt=txt.replace(/(http:\/\/[\x21-\x7e]+)/gi,'<a href="$1">$1</a>').replace(/#(\w+)/g,'<a href="'+twiUrl+'#search?q=%23$1">#$1</a>').replace(/\@(\w+)/g,'<a href="'+twiUrl+'$1">@$1</a>');$('ul',self).append($('<li/>').html(txt))})})})}})(jQuery);
//
jQuery(function ($) {
    $('#twittertl').appendTo("#td1").twLine({
        user: 'blogsupporter',
        number: 5
    });
});



//http://ameblo.jp/wazameba/entry-10909274618.html

/*
　『<div id="nowlist"></div>』に最近投稿したなうを表示するブログパーツ
　Copyright(c) wazameba 2011 All Rights Reserved.
　2011/05/23 わざめーば
　2011/05/29 わざめーば パラメータ「css」の規定値をfalseに変更
　2011/05/31 わざめーば パラメータ「css:true」で外部CSSを読み込むように変更
*/

eval(function (p, a, c, k, e, r) {
    e = function (c) {
        return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36))
    };
    if (!''.replace(/^/, String)) {
        while (c--) r[e(c)] = k[c] || e(c);
        k = [function (e) {
            return r[e]
        }];
        e = function () {
            return '\\w+'
        };
        c = 1
    };
    while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]);
    return p
}('8 X(g){2 h=((4(g)==\'5\')?{}:g);2 j=((4(h.F)==\'5\')?Y.9.Z(/^6\\:\\/\\/w\\.r\\/([^\\/]+).*$/,"$1"):h.F);2 k=((4(h.G)==\'5\')?\'H\':h.G);2 l=((4(h.x)==\'5\')?3:I.x(10(h.x),1));2 m=((4(h.J)==\'5\')?\'まーしーの投稿したなう\':h.J);2 n=((4(h.K)==\'5\')?\'なうを見る\':h.K);2 o=((4(h.t)==\'5\')?L:h.t);2 p=((4(h.M)==\'5\')?L:h.M);8 f(){7(!($(\'a[9="6://w.r/u/"], a[9="6://w.r/u-11/"], a[9="6://u.y/"]\').z)){12}7(o){$(8(){$(\'13\').v(\'<N>@14 O("6://p.u.y/t/H.t");</N>\')})}2 c=$(\'#\'+k);7(c.z){$(c).15(\'16\');$(c).17(\'<A s="P">\'+m+\'</A>\');$(\'A.P\',c).18(\'<Q s="R"></Q>\');2 d=$(\'.R\',c);$(d).v(\'<B></B>\');2 e=$(\'B\',d);7(n){$(d).v(\'<p s="19"><a 9="6://C.S.r/\'+j+\'/">\'+n+\'</a></p>\')}7(4(j)!=\'5\'&&j){2 q=\'1a * 1b T 1c O="6://C.S.r/\'+j+\'/" 1d 1e="//1f[@1g=\'+"\'"+\'1h\'+"\'"+\']/D[@s=\'+"\'"+\'C\'+"\'"+\']/p/1i[@s=\'+"\'"+\'1j\'+"\'"+\']"\';$.1k(\'6://E.1l.y/1m/1n/1o?q=\'+1p(q)+\'&1q=1r&1s=?\',8(a){7(a.E.U){7(a.E.U==1){2 b=[a.V]}W{2 b=a.V}1t(2 i=0;i<I.1u(l,b.z);i++){$(e).v(\'<D>\'+$(b[i]).T()+\'</D>\')}}})}}}7(p){f()}W{$(8(){f()})}}', 62, 93, '||var||typeof|undefined|http|if|function|href||||||||||||||||||jp|class|css|wazameba|append|ameblo|max|com|length|h4|ul|now|li|query|user|oid|nowlist|Math|title|link|false|instantly|style|url|menu_title|div|menu_frame|ameba|html|count|results|else|nowList|location|replace|parseInt|brain|return|body|import|addClass|mainMenu|prepend|after|list|select|from|where|and|xpath|ol|id|nowListArea|span|entry|getJSON|yahooapis|v1|public|yql|encodeURIComponent|format|xjson|callback|for|min'.split('|'), 0, {}));
nowList();


//http://ameblo.jp/exlink/
//ラインカレンダー


function myC(){var w=0,d=0,ss='<span class="',se='</span>',today=new Date(),dd=today.getDate(),liC=document.getElementById("overHeader"),baseC=document.getElementById("calendar"),capC=baseC.getElementsByTagName("caption"),tdC=baseC.getElementsByTagName("td"),dayC=(capC[0].innerHTML+' ');for(var i=0;i<tdC.length;++i){w++;ih=tdC[i].innerHTML;if(ih!=''){d++;if(d==dd){ih=(ss+'to">'+ih+se+' ')}if(w==1){dayC+=(ss+'sn">'+ih+se+' ')}else if(w==7){dayC+=(ss+'st">'+ih+se+' ');w=0}else{dayC+=(ih+' ')}}}liC.innerHTML+=('<p>'+dayC+'</p>')}window.onload=function(){myC()};



//header randam

(function () {
    var img = ["http://stat.blogskin.ameba.jp/blogskin_images/20110531/01/6b/c8/j/o10240768fukushima-js1306772692485.jpg", "http://stat.blogskin.ameba.jp/blogskin_images/20110531/01/47/90/j/o10240768fukushima-js1306772715488.jpg", "http://stat.blogskin.ameba.jp/blogskin_images/20110531/01/ea/69/j/o10240768fukushima-js1306773269354.jpg", "http://stat.blogskin.ameba.jp/blogskin_images/20110531/01/a5/76/j/o10240768fukushima-js1306773315024.jpg", "http://stat.blogskin.ameba.jp/blogskin_images/20110528/06/f1/80/j/o09200690fukushima-heart1306531219924.jpg"];
    $('#header').css('background-image', 'url(' + img[parseInt(Math.random() * img.length)] + ')');
})();

//titlelink
$(function(){$("#sub_main .entry h3.title").wrapInner("<a></a>");$('#sub_main .foot>a:first-child').each(function(i){$("#sub_main .entry h3.title a").eq(i).attr("href",this.href)})});

//hatebu
$(function(){var entries=$(".foot a:contains('記事URL')");for(i=0;i<entries.length;i++){var url=entries[i];var hatena_btn='<a href="http://b.hatena.ne.jp/append?'+url+'" target="blank"><img height="12" width="16" border="0" title="この記事をはてなブックマークに追加" src="http://b.hatena.ne.jp/images/append.gif " /></a> <a href="http://b.hatena.ne.jp/entry/'+url+'" target="blank"><img border="0" src="http://b.hatena.ne.jp/entry/image/'+url+'" title="ブックマーク数"/></a>';$(".theme","div.entry").eq(i).append('  <span>'+hatena_btn+'</span>')}});




//.google-analytics
var _gaq=_gaq||[];_gaq.push(['_setAccount','UA-23580171-1']);_gaq.push(['_trackPageview']);(function(){var ga=document.createElement('script');ga.type='text/javascript';ga.async=true;ga.src=('https:'==document.location.protocol?'https://ssl':'http://www')+'.google-analytics.com/ga.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(ga,s)})();

$("#barLogoTop li.last").removeClass("last");
$("#viewninjamsg,#hideninjamsg").appendTo("#barLogoTop ul").wrap("<li></li>");
//
$(function () {
    $("#profile").clone().appendTo("#td1");
    $("#table").appendTo("#footerArea");
    $("#recent_entries,#theme_list").clone().appendTo("#td2");
});

//
var myMe ='<div id="brank1"><div id="rnktxt"title="よろしければランキングへ(^^)/">このブログの情報は役に立ちましたか？</div><a href="http://blog.with2.net/link.php?1131428:1060"title="人気ブログランキング(アクセスアップ)へ"target="_blank"><img border="0" alt="人気ブログランキングへ" src="http://stat.ameba.jp/user_images/20110601/20/fukushima-heart/27/45/p/o0162007211264485181.png" /></a><BR /><BR /><!----><a href="http://blog.blogmura.com/blog_knowhow/" target="_blank"title="にほんブログ村 ブログブログ ブログノウハウへ"><img src="http://stat.ameba.jp/user_images/20110601/20/fukushima-heart/75/31/p/o0162007211264493147.png" border="0" alt="にほんブログ村 ブログブログ ブログノウハウへ" /></a></div>'
$(function() {
$("#advertising2").before('<div class="fix">'+ myMe + '</div>');
});

//edit
$(function(){$('#sub_main .entry .foot a:first-child').each(function(){var myAA=$(this).attr('href');$(this).after('<a style="margin-right:10px;margin-left:10px;" href="http://blog.ameba.jp/ucs/entry/srventryupdateinput.do?id='+myAA.substr(myAA.length-16,11)+'" target="_blank">編集</a>')})});




//p navi
$(function(){var P=$("#main div.page");var L=$("a",P);for(var i=0;i<L.length;i++){var A=$(L).eq(i);var u=$(A).attr("href");if(u.indexOf("#main")==u.length-5){$(A).attr("href",u.substr(0,u.length-5))}}$(P).css("visibility","visible")});

	

//side

$(window).scroll(function(){if($(this).scrollTop()>10){$('#side').animate({'left':'0px'},500)}else{$('#side').stop(true).animate({'left':'-90px'},500)}});


//画像のポップアップスクリプト
//http://ameblo.jp/zzdino/entry-10901061440.html
$(function(){$('#mainIndex').append('<div id="photoz" />');var photo=$('#photoz');$('#sub_main a.detailOn').click(function(){var imgsrc=$('img',this).attr('src');var src1=imgsrc.replace(/[a-z][0-9_]{28}\.(jpg|png|gif)/,'o'+imgsrc.split('/')[10].split('_')[1]);photo.after('<div class="gazoz"><img src="'+src1+'"/></div>');var phoimg=photo.next().children('img');phoimg.load(function(){var photoh=phoimg.outerHeight();var winh=$(window).height();photo.slideDown(900,function(){if(photoh>winh-60){phoimg.css({height:winh-photoh+phoimg.height()-60,marginTop:30})}else{phoimg.css('marginTop',(winh-photoh)/2)}phoimg.show().wrap('<div title="クリックで閉じます" class="imgwrap" />')})});return false});$('#photoz+.gazoz .imgwrap').live('click',function(){$(this).parent().prev().hide().end().remove()})});





//articlefloater
var memberid = 233;
var deletetitleleft = 0;
var deletetitleright = 13;

var tablewidth = 440;
var textcolor = '000000';
var backgroundcolortitle = 'ffffff';
var backgroundcoloreven = 'ffffff';
var backgroundcolorodd = 'ffffff';
var bordercolorouter = 'ffffff';
var bordercolorinnertitle = 'ffffff';
var bordercolorinnerlist = 'ffffff';
var titlelang = 'jp';
var linecount = 10;

//********************
//
//
var url = location.href;
if (url.match(/^.+\/entry[\-0-9]*\.html$/g)) {
//無題
$(function(){$('.each_comment p.label').each(function(){var nam=$(this).next().next().children('.comment_author');var namae=nam.text();var henkanmae=$(this).text();var ur=nam.children('a').attr('href').split('/')[3];henkango1=henkanmae.replace(/(Re:)*Re:無題$/,namae+'<span class="'+ur+'">さん</span>の返信！');henkango2=henkango1.replace(/■無題$/,'■'+namae+'<span class="'+ur+'">さん</span>のコメ♪');$(this).html(henkango2)})});

$(function () {
var W=450;$('.entry img').each(function(i,e){if($(e).width()>=W){$(e).removeAttr('height').removeAttr('width')}});
$('.each_comment:has(.comment_author a[href="http://ameblo.jp/fukushima-heart/"])').addClass('admin');//admin
$("#main h5").after('<div align="right"><a href="#main" title="トップに戻る">Back to top</a></div>');//insert
$("#ArticleFloaterDiv").insertBefore('#exLinkBtn');});
$.getScript("http://hana.poche.jp/wazameba/js/cmtprofpix.js");

    //articlefloater
    var articletitle = encodeURI(document.title);
    var viewedurl = encodeURI(decodeURI(document.URL));
    var articlefloaterurl = encodeURIComponent('http://mo-c.net/articlefloater/view.php?mid=' + memberid + '&w=' + tablewidth + '&at=' + articletitle + '&vu=' + viewedurl + '&dtl=' + deletetitleleft + '&dtr=' + deletetitleright + '&tc=' + textcolor + '&bgt=' + backgroundcolortitle + '&bge=' + backgroundcoloreven + '&bgo=' + backgroundcolorodd + '&bo=' + bordercolorouter + '&bit=' + bordercolorinnertitle + '&bil=' + bordercolorinnerlist + '&tl=' + titlelang + '&lc=' + linecount);
    document.write(decodeURIComponent('%3Cscript%20type%3D%22text/javascript%22%20src%3D%22' + articlefloaterurl + '%22%20charset%3D%22UTF-8%22%3E%3C/script%3E'));

} else if (url.match(/^.+\/entry[\-0-9]*\.html\#main$/g)) {
//無題
$(function(){$('.each_comment p.label').each(function(){var nam=$(this).next().next().children('.comment_author');var namae=nam.text();var henkanmae=$(this).text();var ur=nam.children('a').attr('href').split('/')[3];henkango1=henkanmae.replace(/(Re:)*Re:無題$/,namae+'<span class="'+ur+'">さん</span>の返信！');henkango2=henkango1.replace(/■無題$/,'■'+namae+'<span class="'+ur+'">さん</span>のコメ♪');$(this).html(henkango2)})});

$(function () {
var W=450;$('.entry img').each(function(i,e){if($(e).width()>=W){$(e).removeAttr('height').removeAttr('width')}});
$('.each_comment:has(.comment_author a[href="http://ameblo.jp/fukushima-heart/"])').addClass('admin');//admin
$("#main h5").after('<div align="right"><a href="#main" title="トップに戻る">Back to top</a></div>');//insert
$("#ArticleFloaterDiv").insertBefore('#exLinkBtn');});
$.getScript("http://hana.poche.jp/wazameba/js/cmtprofpix.js");

    //articlefloater
    var articletitle = encodeURI(document.title);
    var viewedurl = encodeURI(decodeURI(document.URL));
    var articlefloaterurl = encodeURIComponent('http://mo-c.net/articlefloater/view.php?mid=' + memberid + '&w=' + tablewidth + '&at=' + articletitle + '&vu=' + viewedurl + '&dtl=' + deletetitleleft + '&dtr=' + deletetitleright + '&tc=' + textcolor + '&bgt=' + backgroundcolortitle + '&bge=' + backgroundcoloreven + '&bgo=' + backgroundcolorodd + '&bo=' + bordercolorouter + '&bit=' + bordercolorinnertitle + '&bil=' + bordercolorinnerlist + '&tl=' + titlelang + '&lc=' + linecount);
    document.write(decodeURIComponent('%3Cscript%20type%3D%22text/javascript%22%20src%3D%22' + articlefloaterurl + '%22%20charset%3D%22UTF-8%22%3E%3C/script%3E'));

} else if (url.match(/^.+\/entry[\-0-9]*\.html\#cbox$/g)) {
//無題
$(function(){$('.each_comment p.label').each(function(){var nam=$(this).next().next().children('.comment_author');var namae=nam.text();var henkanmae=$(this).text();var ur=nam.children('a').attr('href').split('/')[3];henkango1=henkanmae.replace(/(Re:)*Re:無題$/,namae+'<span class="'+ur+'">さん</span>の返信！');henkango2=henkango1.replace(/■無題$/,'■'+namae+'<span class="'+ur+'">さん</span>のコメ♪');$(this).html(henkango2)})});

$(function () {
var W=450;$('.entry img').each(function(i,e){if($(e).width()>=W){$(e).removeAttr('height').removeAttr('width')}});
$('.each_comment:has(.comment_author a[href="http://ameblo.jp/fukushima-heart/"])').addClass('admin');//admin
$("#main h5").after('<div align="right"><a href="#main" title="トップに戻る">Back to top</a></div>');//insert
$("#ArticleFloaterDiv").insertBefore('#exLinkBtn');});
$.getScript("http://hana.poche.jp/wazameba/js/cmtprofpix.js");

    //articlefloater
    var articletitle = encodeURI(document.title);
    var viewedurl = encodeURI(decodeURI(document.URL));
    var articlefloaterurl = encodeURIComponent('http://mo-c.net/articlefloater/view.php?mid=' + memberid + '&w=' + tablewidth + '&at=' + articletitle + '&vu=' + viewedurl + '&dtl=' + deletetitleleft + '&dtr=' + deletetitleright + '&tc=' + textcolor + '&bgt=' + backgroundcolortitle + '&bge=' + backgroundcoloreven + '&bgo=' + backgroundcolorodd + '&bo=' + bordercolorouter + '&bit=' + bordercolorinnertitle + '&bil=' + bordercolorinnerlist + '&tl=' + titlelang + '&lc=' + linecount);
    document.write(decodeURIComponent('%3Cscript%20type%3D%22text/javascript%22%20src%3D%22' + articlefloaterurl + '%22%20charset%3D%22UTF-8%22%3E%3C/script%3E'));

} else if (url.match(/^.+\/entry[\-0-9]*\.html\#c[\0-9]*$/g)) {
//無題
$(function(){$('.each_comment p.label').each(function(){var nam=$(this).next().next().children('.comment_author');var namae=nam.text();var henkanmae=$(this).text();var ur=nam.children('a').attr('href').split('/')[3];henkango1=henkanmae.replace(/(Re:)*Re:無題$/,namae+'<span class="'+ur+'">さん</span>の返信！');henkango2=henkango1.replace(/■無題$/,'■'+namae+'<span class="'+ur+'">さん</span>のコメ♪');$(this).html(henkango2)})});

$(function () {
var W=450;$('.entry img').each(function(i,e){if($(e).width()>=W){$(e).removeAttr('height').removeAttr('width')}});
$('.each_comment:has(.comment_author a[href="http://ameblo.jp/fukushima-heart/"])').addClass('admin');//admin
$("#main h5").after('<div align="right"><a href="#main" title="トップに戻る">Back to top</a></div>');//insert
$("#ArticleFloaterDiv").insertBefore('#exLinkBtn');});
$.getScript("http://hana.poche.jp/wazameba/js/cmtprofpix.js");

    //articlefloater
    var articletitle = encodeURI(document.title);
    var viewedurl = encodeURI(decodeURI(document.URL));
    var articlefloaterurl = encodeURIComponent('http://mo-c.net/articlefloater/view.php?mid=' + memberid + '&w=' + tablewidth + '&at=' + articletitle + '&vu=' + viewedurl + '&dtl=' + deletetitleleft + '&dtr=' + deletetitleright + '&tc=' + textcolor + '&bgt=' + backgroundcolortitle + '&bge=' + backgroundcoloreven + '&bgo=' + backgroundcolorodd + '&bo=' + bordercolorouter + '&bit=' + bordercolorinnertitle + '&bil=' + bordercolorinnerlist + '&tl=' + titlelang + '&lc=' + linecount);
    document.write(decodeURIComponent('%3Cscript%20type%3D%22text/javascript%22%20src%3D%22' + articlefloaterurl + '%22%20charset%3D%22UTF-8%22%3E%3C/script%3E'));

}






//link look
//http://www.skuare.net/test/jLinkLook.html

jQuery.fn.linklook=function(opt){jQuery("a",this).each(function(){jQuery(this).hover(function(){var loaded=false;jQuery("<img>").hide().addClass("linklook").insertAfter(this).attr({src:"http://capture.heartrails.com/large?"+jQuery(this).attr("href").replace("/http:\/\//","")}).bind("load",function(){if(!loaded){loaded=true;jQuery(this).fadeIn(800)}}).css({position:"absolute",top:jQuery(this).offsetTop()+ -320+"px",left:jQuery(this).offsetLeft()+15+"px",zIndex:"10"})},function(){jQuery(this).next().filter("img").fadeOut(600,function(){$(this).remove()})})})}

/**
 by Peter-Paul Koch & Alex Tingle
 */
jQuery.fn.offsetLeft = function () {

    var e = $(this)[0];
    var curleft = 0;
    if (e.offsetParent) while (1) {
        curleft += e.offsetLeft;
        if (!e.offsetParent) break;
        e = e.offsetParent;
    } else if (e.x) curleft += e.x;
    return curleft;
}

jQuery.fn.offsetTop = function () {

    var e = $(this)[0];
    var curtop = 0;
    if (e.offsetParent) while (1) {
        curtop += e.offsetTop;
        if (!e.offsetParent) break;
        e = e.offsetParent;
    } else if (e.y) curtop += e.y;
    return curtop;
}


//
$(document).ready(function () {
var url=location.href;
//記事一覧ページ
if (url == "http://ameblo.jp/fukushima-heart/entrylist.html") {
    $('#recent_entries_list').linklook();
}
//記事一覧2ページ目以降全て
else if(url.match(/^.+\/entrylist[\-0-9]*\.html$/g )) {
    $('#recent_entries_list').linklook();
}

//読者一覧ページ
else if (url == "http://ameblo.jp/fukushima-heart/reader.html") {
    $('#reader_list').linklook();
}
//読者一覧2ページ目以降全て
else if(url.match(/^.+\/reader[\-0-9]*\.html$/g )) {
    $('#reader_list').linklook();
}
//お気に入りブログ一覧ページ
else if (url == "http://ameblo.jp/fukushima-heart/favorite.html") {
    $('#favoriet_list').linklook();
}
//お気に入りブログ一覧2ページ目以降全て
else if(url.match(/^.+\/favorite[\-0-9]*\.html$/g )) {
    $('#favorite_list').linklook();
}
//bookmark一覧ページ
else if (url == "http://ameblo.jp/fukushima-heart/bookmark.html") {
    $('#bookmark_list').linklook();
}
//bookmark一覧2ページ目以降全て
else if(url.match(/^.+\/bookmark[\-0-9]*\.html$/g )) {
    $('#bookmark_list').linklook();
}
//記事ページ
else{
    $('.subContents').linklook();
}
});

//tool tip
//

//http://5509.me/log/how-to-make-tooltip-using-jquery
jQuery(function($){$("body *").filter(function(){return this.title&&this.title.length>0}).each(function(){var self=$(this),title=self.attr("title");self.hover(function(e){self.attr("title","");$("body").append("<div id='title-tip'><div class='tip-top'><div class='tip-white'>"+title+"</div></div></div>");$("#title-tip").css({position:"absolute",top:e.pageY+(-15),left:e.pageX+15})},function(){self.attr("title",title);$("#title-tip").hide().remove()});self.mousemove(function(e){$("#title-tip").css({top:e.pageY+(-15),left:e.pageX+15})})})});


//smoothscroll 
//http://www.coolwebwindow.com/weblife_column/coolweb/000301.php

$(function(){$('a[href^=#]').click(function(){var speed=1000;var href=$(this).attr("href");var target=$(href=="#"||href==""?'html':href);var position=target.offset().top;$($.browser.safari?'body':'html').animate({scrollTop:position},speed,'swing');return false})});
